import request from '@/utils/request'

// api地址
const api = {
  list:'/oms/yoshopOrder/listSelfOrder',
  cancel:'/oms/yoshopOrder/closeOrder',
  detail:'/oms/yoshopOrder/getDetailsByID',
  pay:'/oms/yoshopOrder/sendPayInfo',
  orderStatus:'/oms/yoshopOrder/updateOrderStatus',
  delete:'/oms/yoshopOrder/del',
  logistics:'/oms/yoshopLogistics/getLogisticsByOrderId',
  takeDelivery:'/oms/yoshopOrder/updateReceiptStatus',
  }

// 订单列表
export const list = (param) => {
  return request.get(api.list,param)
}
// 取消订单
export const cancel = (param) => {
  return request.get(api.cancel,param)
}
// 订单详情
export const detail = (param) => {
  return request.get(api.detail,param)
}
// 订单支付
export const sendPay = (param) => {
  return request.get(api.pay,param)
}
// 订单状态
export const orderStatus = (param) => {
  return request.get(api.orderStatus,param)
}

// 删除订单
export const deleteOrder = (param) => {
  return request.get(api.delete,param)
}

// 查询物流
export const logistics = (param) => {
  return request.get(api.logistics,param)
}

// 确认收货
export const takeDelivery = (param) => {
  return request.get(api.takeDelivery,param)
}
